package com.kaifamiao.demo.d0820;

import java.util.*;

public class Demo07 {

    public static void main(String[] args) {

        /**
         * 不声明泛型，可理解为 Object
         * 泛型擦除
         */
        ArrayList<String> list = new ArrayList<>();
//        Map<String, Integer> map = new HashMap<>();



//        list.add(1);
//        list.add("ahc");
//        list.add(2);
//        list.add(new Stu("张三", 28));

        Object[] objs = list.toArray();
        Arrays.sort(objs);

        String[] strs = {};

        System.out.println(Arrays.toString(objs));

        for (Object obj : list){
            System.out.println(obj);
        }

        Student<String> student = new Student<>();
        student.say(1);

    }
}

class Student<T> {

    public <T> T say(T t){
        return t;
    }
}

interface Person<T>{

}
